<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <title>地址列表</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/main.css">
    <link rel="stylesheet" href="../../css/vant.css">

</head>
<style>
    .add-address-btn-container {
        width: 100%;
        height: 70px;
        background: #ffffff;
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        bottom: 0;
        z-index: 100;
    }

    .add-address-btn {
        height: 50px;
        background: #3F8CEC;
        border-radius: 25px;
        line-height: 50px;
        width: 300px;
        font-size: 16px;
        color: #ffffff;
        text-align: center;
    }
</style>

<body>

    <div class="app xuanzedizhi" v-cloak>
        <header>
            <div class="flex-x-sb">
                <span class="iconfont goback" @click="backPage">&#xe66f;</span>
                <div class="title">
                    地址
                </div>
            </div>
        </header>

        <div class="add-address-btn-container">
            <div class="add-address-btn" @click="forwardPage('address_add_win', '', {status: 'add'})">新增地址</div>
        </div>

        <!-- <div class="add-addr-btn" style="z-index:999" @click="forwardPage('add_addr_win', '', {status: 'add'})">添加新地址</div> -->

    </div>


    <script src="../../script/api.js "></script>
    <script src="../../script/flexible.js "></script>
    <script src="../../script/fastclick.js "></script>
    <script src="../../script/vue.min.js "></script>
    <script src="../../script/iconfont.js "></script>
    <script src="../../script/vant.min.js"></script>

    <script>
        apiready = function () {

            var vm = new Vue({
                el: ".app",
                data: {
                    status: api.pageParam.status,
                    footH:0,

                },
                mounted() {
                    // console.log(JSON.stringify(this.status));
                    var header = $api.dom('header');
                    var headerH = $api.fixStatusBar(header);
                    this.footH = $api.fixTabBar($api.dom(".add-address-btn-container"))

                    api.openFrame({
                        name: 'address_list_frm',
                        url: 'address_list_frm.html',
                        rect: {
                            marginTop: headerH+8,
                            marginBottom: 100,
                            w: 'auto'
                        },
                        pageParam: api.pageParam
                    });
                },
                methods: {
                    backPage() {
                        api.closeWin();
                    },
                    forwardPage(url, relative, options) {
                        console.log(url)
                        api.openWin({
                            name: url,
                            url: (relative || "") + url + '.html',
                            bounces: false,
                            pageParam: options
                        });
                    },

                }
            })
        }
    </script>
</body>

</html>